import com.yc.AppConfig;
import com.yc.biz.AccountBiz;
import com.yc.biz.BizException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

import java.sql.SQLException;

public class Test {
    public static void main(String[] args) throws SQLException, BizException {
        ApplicationContext ac=new AnnotationConfigApplicationContext(AppConfig.class);
        //DataSource ds= (DataSource) ac.getBean("dataSource2");
        //System.out.println(  ds );
        //System.out.println(   ds.getConnection() );
        AccountBiz ab= (AccountBiz) ac.getBean("accountBizImpl");

        ab.deposite(1,2.0);
    }
}
